home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 1998 January
/
CHIP Turkiye Ocak 1998.iso
/
ARACLAR
/
LOTUSORG
/
ACROREAD
/
DOC.LSS
< prev
next >
Wrap
Text File
|
1996-06-20
|
90KB
|
2,423 lines
'/*********************************************************************
''
'' Module Name: DOC.lss
''
'' Module Code: COMINST
''
'' Author:
''
'' Creation Date: Jan 26, 1994
''
'' Copyright Lotus Development Corporation, (c) 1994
''
''
''
'' Description:
''
''
'' Additional authors:
''
'' Change History:
'' $Log: //CIT/VOL1/CFLOG/logfiles/cominst/dockit/doc____@.lss $
''
'' Rev 1.52 01 Sep 1995 13:11:38 amontalv
'' Correction to how icons are named. Had used call to Lot_GetProgFolder, which was
'' only needed when registering the link object.
''
'' Rev 1.51 29 Aug 1995 14:16:52 tveerapp
'' Commented out code to surface default preferences dialog.
''
'' Rev 1.50 28 Aug 1995 16:59:30 tveerapp
'' FIxed the node initcopylist code that turned off sections not installed on
'' the server.
''
'' Rev 1.49 28 Aug 1995 13:41:40 tveerapp
'' No change.
''
'' Rev 1.48 28 Aug 1995 13:40:12 tveerapp
'' Removed the example for registering the Program Group for
'' uninstall. This fixes an spr.
''
'' Rev 1.47 25 Aug 1995 11:27:06 amontalv
'' Made icons in all environments have same name.
''
'' Rev 1.46 24 Aug 1995 10:30:48 jdonohue
'' Added comment about USERDIR
''
'' Rev 1.45 23 Aug 1995 12:26:54 tveerapp
'' Added code to register work, masters and backup directories with the toolkit.
''
'' Rev 1.44 22 Aug 1995 18:24:54 tveerapp
'' Added the callback etc for work, smasters and backup.
''
'' Rev 1.43 22 Aug 1995 15:17:10 jdonohue
'' Do not register the uninstaller for language install
''
'' Rev 1.42 22 Aug 1995 14:03:20 jdonohue
'' Changed GetDOCPathfromLotusIni to check for registry entries
'' Function GetDOCPathfromLotusIni returns path w/o filename now
''
'' Rev 1.41 21 Aug 1995 15:50:54 amontalv
'' Added global for registry entry.
''
'' Rev 1.40 21 Aug 1995 10:23:48 jdonohue
'' Added calls in Init for marking secondary language content directories
'' Moved language directory symbol setting code to InitCopyList
''
'' Rev 1.39 17 Aug 1995 09:34:14 amontalv
'' Had put wrong number of arguments.
''
'' Rev 1.38 16 Aug 1995 20:35:30 amontalv
'' Added some error handling for registry.
''
'' Rev 1.37 15 Aug 1995 11:53:12 jdonohue
'' Removed SYM_INSTALLKIND$ -- in GLOBALS.LSS
''
'' Rev 1.36 09 Aug 1995 09:18:16 jdonohue
'' Don't add language qualifier to icon for first time install
''
'' Rev 1.35 04 Aug 1995 15:53:38 jdonohue
'' Added code to create icons with language switch and sublanguage name appended
''
'' Rev 1.34 02 Aug 1995 16:54:54 jdonohue
'' Changed calling syntax for InitLanguageDOC
''
'' Rev 1.33 31 Jul 1995 16:28:10 pdonahue
'' changed verison number from 2.1 to 0.0.
'' Changed registry entry for installtype from type REG_SZ to REG_DWORD.
''
'' Rev 1.32 20 Jul 1995 14:20:58 jdonohue
'' Fixed uninstall command line string for language
''
'' Rev 1.31 12 Jul 1995 17:07:18 jdonohue
'' Added comments about language install subdirectories
''
'' Rev 1.30 23 Jun 1995 13:55:56 mzgripce
'' remove autoinst.rsp from the uninstaller registration example
''
'' Rev 1.29 23 Jun 1995 13:24:56 mzgripce
'' added an example for the Program_group class registration
''
'' Rev 1.28 22 Jun 1995 18:38:14 mzgripce
'' register the components that are going with the doc product:aswan and its
'' dependency: LotusScript,Bento and Shared help
''
'' Rev 1.27 21 Jun 1995 18:01:26 mzgripce
'' add examples for the other object clases registration for uninstall
''
'' Rev 1.26 21 Jun 1995 12:48:08 jdonohue
'' SYM_INSTALLKIND global symbol, not product specific
''
'' Rev 1.25 21 Jun 1995 09:09:42 jdonohue
'' Moved AddRegistryLanguage to AddRegistryKeysDOC
''
'' Rev 1.24 19 Jun 1995 17:41:56 mzgripce
'' change the doc version to 2.1 and enable the uninstaller registration
''
'' Rev 1.23 19 Jun 1995 16:53:24 mzgripce
'' add examples calls to Lot_RegisterObject()
''
'' Rev 1.22 16 Jun 1995 17:08:02 pdonahue
'' added registry entries for doc.
''
'' Rev 1.21 09 Jun 1995 17:00:58 mzgripce
'' added call example in PostCopyConfig to register the uninstaller
''
'' Rev 1.20 07 Jun 1995 16:32:08 amontalv
'' Changed the Win95 start folder so that it initializes
'' earlier in the program. This should make automation
'' easier to implement for it. There are still a couple of
'' bugs that I need to work out, but I feel that I should
'' check what I have now. I also changed the name of some
'' of the functions to conform more to current names.
''
'' Rev 1.19 01 Jun 1995 14:54:10 amontalv
'' Had the check incorrect for creating links. It tried to create links
'' when not in Win95 instead of when in Win95.
''
'' Rev 1.18 01 Jun 1995 11:11:52 amontalv
'' Added API function CreateLink to create shortcuts. Also added functions
'' to save and get the link path to support the CreateLink. I also changed
'' the startup program folder code to use the default dialog proc and changed
'' the default dialog proc to process directory trees.
''
'' Rev 1.17 30 May 1995 16:01:00 jdonohue
'' Set symbols for product and version for language install
''
'' Rev 1.16 21 May 1995 17:30:24 mzgripce
'' add an example for share32 support
''
'' Rev 1.15 19 May 1995 15:31:28 mzgripce
'' use the parent dir in the product default destination
''
'' Rev 1.14 19 May 1995 14:42:44 jdonohue
'' Remove redundant symbol for language subdirectory
''
'' Rev 1.13 19 May 1995 13:23:46 jdonohue
'' Added call to Lot_SetLanguageSectionsOn
''
'' Rev 1.12 18 May 1995 15:36:52 jdonohue
'' Added language install code
''
'' Rev 1.11 18 May 1995 10:18:52 jdonohue
'' Added language install function InitLanguage
''
'' Rev 1.9 02 May 1995 12:54:06 cmoy
'' Merged c2 into cf build
''
'' Rev 1.9 10 Apr 1995 18:11:28 amontalv
'' Changed comments to reflect change of function reference.
''
'' Rev 1.8 31 May 1994 13:54:42 mmeth
''
'' Added PrevVersionDOC
''
'' Rev 1.7 13 May 1994 14:09:20 thangv
''
'' Added the else part to the default code in InitDOC case node.
''
'' Rev 1.6 06 May 1994 09:24:52 mmeth
'' wrong return for function
''
'' Rev 1.5 02 May 1994 19:18:16 mzgripce
''
'' add AddIconsDOC
''
'' Rev 1.4 28 Mar 1994 17:25:50 thangv
''
'' Resourced strings that were not. SID_DOC_SERVER_DIRNAME, SID_DOC_DIST_DIRNA
''
'' Rev 1.3 22 Mar 1994 09:24:46 mmeth
'' Modified AddTo Billboard List to use IDD_DOCBILLBD1,...
''
'' Rev 1.2 17 Feb 1994 17:44:44 thangv
'' Fixed the trailing \ and DOC_DIR
''
'' Rev 1.1 15 Feb 1994 14:36:20 mmeth
'' moved the EXIT FUNCTION CALL in
''
'' Rev 1.0 11 Feb 1994 10:53:40 jbrodeur
'' Initial Revision
''----------------------------------------------------------------------
'' Date Vers. Pgmr SPR# Change
''----------------------------------------------------------------------
'' !
'' 02-07-94 0000 Initial Product Shipment
''
''----------------------------------------------------------------------
''
''*********************************************************************/
'** This file contains detailed comments. PLEASE READ THEM! They provide
'** information that will make writing Install much easier. In some
'** cases, you will not find this information in any other sources.
''*********************************************************************/
'**
USE "TOOLKIT"
USE "LANGUAGE"
OPTION DECLARE
'** These Are the Required Functions that Products must provide
'***************************************************************
DECLARE PUBLIC FUNCTION ProductRegDOC (prodno%, network$, direction$) AS STRING
DECLARE PUBLIC FUNCTION DefaultUserRegDOC (prodno%, network$, direction$) AS STRING
DECLARE PUBLIC FUNCTION InitDOC (prodno%, network$, direction$, basedir$) AS STRING
DECLARE PUBLIC FUNCTION PrevVersionsDOC (prodno%, network$, direction$) AS STRING
DECLARE PUBLIC FUNCTION PathChangeDOC (prodno%, network$, direction$, destdirsym$, mainprodsonly%) AS STRING
DECLARE PUBLIC FUNCTION InitCopyListDOC (prodno%, network$, direction$) AS STRING
DECLARE PUBLIC FUNCTION PreCopyConfigDOC (prodno%, network$, direction$, lic%) AS STRING
DECLARE PUBLIC FUNCTION AddTheBillBoardsDOC (prodno%, network$, direction$, nbytes&) AS STRING
DECLARE PUBLIC FUNCTION PostCopyConfigDOC (prodno%, network$, direction$, programgroup$) AS STRING
DECLARE PUBLIC FUNCTION AddIconsDOC (prodno%, network$, direction$, programgroup$) AS STRING
DECLARE PUBLIC FUNCTION UIDOC (prodno%, network$, direction$) AS STRING
DECLARE PUBLIC FUNCTION PostSuccessRegDOC (prodno%, network$, direction$) AS STRING
DECLARE PUBLIC SUB AddRegistryKeysDOC (prodno%, network$)
DECLARE PUBLIC FUNCTION InitLanguageDOC (prodno%, network$, direction$) AS STRING
'** Product specific functions
'*****************************
DECLARE FUNCTION GetDOCPathfromLotusIni() AS STRING
DECLARE FUNCTION FindWindowA LIB "user32" (ByVal lpClassName As Any, ByVal lpCaption As Any) AS LONG
DECLARE FUNCTION DetectPreviousVersion (Productfound$) AS STRING
DECLARE SUB DOCRemoveProdFilesCB (hDlg&, CtrlId%, Classes$, LInst&)
DECLARE SUB DOC_RegisterSharedComponent(Key$, FileName$, Version$)
'*************************************************************************
'**************************** Required Functions *************************
'*************************************************************************
'*************************************************************************
'** SUB Initialize
'**
'** Purpose: The only purpose of this routine is to register your product.
'** This routine assigns your acronym to your product.
'** Without this function, your product will not install.
'** All you need to do in this subroutine is:
'** modify DOC -> your acronym.
'**
'** ASSUMPTIONS: Many things in the toolkit key off of your
'** acronym. These are the constraints:
'** 1. Your top level chapter in the INF must
'** have a KEYWORD of your acronym +"TOP"
'** e.g. acronymTOP
'** Author: Marcel Meth
'** Arguments: None
'** Returns: NONE
'*************************************************************************
SUB Initialize
Reg_RegisterProductNames "DOC", LdString(SID_DOC_COMMERCIALNAME)
END SUB
'*************************************************************************
'** FUNCTION ProductRegDOC (prodno%, network$, direction$) AS INTEGER
'**
'** Purpose: This function allows your product to register itself
'** in the Install Product Registry. The toolkit stores
'** the information provided and will provide you with
'** various features accordingly. For example, if you support
'** shared files, the toolkit will do most of the work
'** for the LOTUSAPP directory.
'**
'** For the most part you should use only Reg_Set... Functions.
'**
'**
'** If you turn on ATM, LICENSING, or SHARED tools, then
'** you must be sure to add the appropriate lines and files
'** in your acronym.SCR and acronym.LYT, respectively.
'** See Cookbook.
'**
'** If you support server install, (because you need the files
'** for Licenser), you will have to make sure that you have
'** the correct **entire** contents of install.lyt and install.scr
'** for the install files in your acronym.SCR and acronym.LYT
'**
'**
'** Arguments: All paremeters are **read only**.
'** prodno%: This is your prodno%. It is assigned to you by the
'** toolkit in the order in which you were registered.
'** When your product is part of SmartSuite, SmartSuite
'** will always be product #1. (prodno% >=1)
'** network$: UNINITIALIZED
'** direction$: gNEXT | gBACK (If gBACK, and you are showing UI)
'** then step backwards, i.e start at your last dialog
'** first.
'**
'** Errors: No return code for errors, you must Raise them
'** Author: MMeth
'** Returns: return: gNEXT | gBACK (If you are showing UI and you
'** allow the user to step backwards.)
'*************************************************************************
PUBLIC FUNCTION ProductRegDOC (prodno%, network$, direction$) AS STRING
ProductRegDOC = gNEXT
'** FOR a complete set of things to register
'** see API doc under Reg_Set...
Reg_SetSupportedInstallTypes prodno%, 1, 1, 1
Reg_SetProdSizes prodno%, 3 * 1048576, 2 * 1048576
'** If you need Lotusapp or datalens support turn this on.
'' Reg_SetShareFlags prodno%, 1, 1, 1, 1
'' JH commented-out ShareFlags for Org DocOnline (unsupported in CIT 2.1)
'** If you need Components directory turn this on.
Reg_SetShare32Flag prodno%, 1
'** Coming to an install program near you soon
'Reg_SetCDOption prodno%,Inst%,CDOptStr$
'Reg_SetCDOptionSelected ProdNo%,Inst%,Selection%
'** Any options that you want your sys-admin and node user to see
'** must be entered here. They must correspond with keywrods in the
'** inf file. This functionality will be avilable March 4, but you
'** can set these fields now!
'Reg_SetNodeOption ProdNo%,Inst%,NodeOptStr$
'Reg_SetNodeOptionSelected ProdNo%,Inst%,Selection%
'** Toolkit default is for no server supprt, turn on if desired.
Reg_SetSrvSupport prodno%, 1
'** Toolkit default is for no server supprt, turn on if desired.
'** license support only available for server install.
Reg_SetLicenseSupport prodno%, 0
'** Toolkit default is no ATM support
'Reg_SetATMSupport prodno%, 0
'** This is the default value the user will see.
Reg_SetProgManagerGroup prodno%, LdString(SID_DOC_PROG_GROUP)
'** Required if you have a work, smartmasters and backup directories
'** register support with the toolkit to surface the dialog
'Reg_SetMoreDirsData prodno%, "DOCMOREDIRSCB", DBDOC_MOREDIRS, DBDOC_MOREDIRS
END FUNCTION
'*************************************************************************
'** FUNCTION DefaultUserRegDOC (prodno%, network$, direction$) AS STRING
'**
'** Purpose: **Only** the first registered product gets called.
'** For SmartSuite, this will be SmartSuite.
'** This function allows you to set the default user registration
'** information that the user will be shown. The toolkit
'** will provide default values from MS-Windows. If you disagree
'** with them you should modify them in this function using:
'** SetSymbolValue on SYM_NAME, SYM_COMPANY & SYM_SERIALNUM$
'**
'** It is up to you how you store registration information.
'** It will not be stored until later in PostCopyConfigDOC.
'** The CIT provides functions that allow you to access .ri
'** files: Lot_ReadDefaultsfromRi(ripath$).
'**
'** If you need to write back to the floppy, do it here.
'** Most Lotus products will no longer write back to the floppy.
'** Remeber, you can't write back to a CD or network!
'**
'** In Symbols : SYM_NAME$, SYM_COMPANY$
'** Out Symbols: SYM_NAME$, SYM_COMPANY$, SYM_SERIALNUM$
'**
'** Arguments: All paremeters are **read only**.
'** prodno%: This is your prodno%. It is assigned to you by the
'** toolkit in the order in which you were registered.
'** When your product is part of SmartSuite, SmartSuite
'** will always be product #1. (prodno% >=1)
'** network$: UNINITIALIZED
'** network$: gSTANDARD | gSERVER | gNODE | gDISTRIBTUION
'** direction$: gNEXT | gBACK (If gBACK, and you are showing UI)
'** then step backwards
'**
'** direction$: gNEXT | gBACK (If gBACK, and you are showing UI)
'** then step backwards, i.e start at your last dialog
'** first.
'**
'** Errors: No return code for errors, you must Raise them
'** Author: MMeth
'** Returns: return: gNEXT | gBACK (If you are showing UI and you
'** allow the user to step backwards.)
'*************************************************************************
PUBLIC FUNCTION DefaultUserRegDOC (prodno%, network$, direction$) AS STRING
DIM ripath$, defdir$, temp%, rc%
DefaultUserRegDOC = gNEXT
rinotfound:
END FUNCTION
'*************************************************************************
'** FUNCTION InitDOC (prodno%, network$, direction$, basedir$) AS STRING
'**
'** Purpose: This function will be called after the Welcome dialog has been
'** filled in by the user. This is the first time you will be
'** called when the server parameter is valid.
'** You need to use this function to intialize certain things.
'** (See the MUST DO below).
'**
'** This is a good place to put up a LotusScript messagebox warning the user
'** of a previous version of your product. If there is a previous
'** version you might want to steer them towards overwriting it,
'** deleting the old version, or allowing both versions to exist.
'**
'**
'** Must Do: You **MUST** set inital values for all of the destination
'** ======= directories that you refer to in your INF file. If you do not,
'** then InitCopylist will fail! e.g. SetSymbolValue "DOCDIR", basedir$
'** Of course you may be more intelligent. You should preface your
'** directory with basedir$. The toolkit is finding a good drive
'** letter and basedirectory. Also, remeber all paths end in a
'** \ and are lower case.
'**
'** You should **NOT** define LOTUSAPPDIR, NETLOTUSAPPDIR, WINDIR,
'** USERDIR & WINSYSDIR. The toolkit does this for you.
'**
'** Once you have defined destdir symbols, you need to register
'** them with the toolkit. (See the code below)
'**
'** In Symbols :
'** Out Symbols:
'**
'** Arguments: All paremeters are **read only**.
'** prodno%: This is your prodno%. It is assigned to you by the
'** toolkit in the order in which you were registered.
'** When your product is part of SmartSuite, SmartSuite
'** will always be product #1. (prodno% >=1)
'** network$: gSTANDARD | gSERVER | gNODE | gDISTRIBTUION
'** direction$: gNEXT | gBACK (If gBACK, and you are showing UI)
'** then step backwards
'**
'** direction$: gNEXT | gBACK (If gBACK, and you are showing UI)
'** then step backwards, i.e start at your last dialog
'** first.
'**
'** basedir$: The toolkit has found a good base. for your directory.
'** This is it. You should use it. This will make Smart
'** Suite work, and will pick a good drive letter for you.
'**
'** Errors: No return code for errors, you must Raise them
'** Author: MMeth
'** Returns: return: gNEXT | gBACK (If you are showing UI and you
'** allow the user to step backwards.)
'**
'*************************************************************************
PUBLIC FUNCTION InitDOC (prodno%, network$, direction$, basedir$) AS STRING
DIM sym$, symname$, defdir$, position%, proddir$, iniPath$, rv%
DIM parentdir$, Docversion$, lotusiniPath$
DIM nFind%, previousprod$, Productfound$, temp%, fullpath$
InitDOC = direction$
'' In the backwards case, keep backing up
If direction$ = gBACK Then
EXIT FUNCTION
End If
'** Put up dialog box if a version is currently running
'** Use the window class name and see if we can find it
IF network$ <> gDISTRIBUTION then
nFind% = FindWindowA ("Acrobat Viewer",0& )
while direction$ = gNEXT$ AND nFind% <> 0
direction$ = PopupModalDlg (DBDOC_RUNNING, DBDOC_RUNNING)
if direction$ = gBACK$ then
InitDOC = direction$
EXIT FUNCTION
end if
nFind% = FindWindowA ("Acrobat Viewer",0&)
wend
End if
'*** Setup Default directory settings
basedir$ = GetSymbolValue(SYM_BASEDIR$)
sym$ = Reg_GetDirSymbolList(prodno%)
symname$ = sym$ + gNAME
'SUIT IF network$ <> gDISTRIBUTION then
'SUIT
'SUIT IF IsLongDirPath(basedir$) = TRUE THEN
'SUIT IF GetSymbolValue(SYM_SINGLESMARTSUITE$) = gSMARTSUITE$ THEN
'SUIT basedir$ = GetSymbolValue(SYM_BASE16DIR$)
'SUIT ELSE
'SUIT ErrorMsg SID_DOC_LONGDIRPATHINVALID, ""
'SUIT direction$ = gBACK
'SUIT InitDOC = direction$
'SUIT EXIT FUNCTION
'SUIT END IF
'SUIT ELSEIF Lot_IsUnvalidatedUNCPath(basedir$) = TRUE AND _
'SUIT network$ <> gSERVER THEN
'SUIT IF GetSymbolValue(SYM_SINGLESMARTSUITE$) = gSMARTSUITE$ THEN
'SUIT basedir$ = GetSymbolValue(SYM_BASE16DIR$)
'SUIT ELSE
'SUIT ErrorMsg SID_DOC_UNCPATHINVALID, ""
'SUIT direction$ = gBACK
'SUIT InitDOC = direction$
'SUIT EXIT FUNCTION
'SUIT END IF
'SUIT End If
'SUIT End If
'' Setup Default directory settings and the associated
'' text that the user will see
basedir$ = GetSymbolValue(SYM_BASEDIR$)
sym$ = Reg_GetDirSymbolList(prodno%)
symname$ = sym$ + gNAME
''These two line register it with the toolkit.
SetListItem sym$, 1, "DOCDIR"
SetListItem symname$, 1, "DOCDIRNAME"
'** NOTE The path in the string table is lower case and ends with a slash
SetSymbolValue "DOCDIR", basedir$ + LdString(SID_DOC_DIR)
'** This will be the name of the directory that shows up in captions in
'** toolkit dialogs (Static text)
SetSymbolValue "DOCDIRNAME", LdString(SID_DOC_DIRNAME)
SetSymbolValue "DOCOBSDIR1", basedir$ + LdString(SID_DOC_DIR)
SetSymbolValue "DOCOBSDIR2", basedir$ + LdString(SID_DOC_DIR)
'** Put up a dlg box, if previous version of product found
'==========================================================
If network$ = gSTANDARD$ Then
previousprod$ = DetectPreviousVersion(Productfound$)
If Productfound$ = "True" Then
Reg_SetObsFiles prodno%,1
else
If previousprod$ = "YES" Then
if GetSymbolValue(SYM_SINGLESMARTSUITE$) = gSMARTSUITE$ then
Reg_SetPreviousVersion prodno%,"1"
else
direction$ = PopupModalDlg (DB_EXISTINGDOC, DB_EXISTINGDOC)
If direction$ = gBACK Then
InitDOC = direction$
EXIT FUNCTION
End If
End if
end if
End if
End if
'' Special Cases for setting these symbols
'' Strings should be resourced, but we didn't want to clutter
'' the DOC string table.
SELECT CASE network$
CASE gSERVER$
SetSymbolValue "DOCNAME", LdString(SID_DOC_SERVER_DIRNAME)
CASE gDISTRIBUTION$
SetSymbolValue "DOCNAME", LdString(SID_DOC_DIST_DIRNAME)
CASE gSTANDARD$, gNODE$
iniPath$ = GetWindowsDir() + "lotus.ini"
if DoesFileExist(inipath$,femExists) then
defdir$ = GetIniKeyString( iniPath$,"Lotus Applications", "DocOnline")
'print defdir$
if defdir$ <> "" then
temp% = INSTR(1,LCASE$(defdir$),"release")
if temp% <> 0 then
Docversion$ = MID$(defdir$,(temp%+8),3)
else
Docversion$ = "0"
end if
IF (Docversion$ = "2.1") THEN
temp% = INSTR(1,LCASE$(defdir$),"acroread.exe")
proddir$ = MID$(defdir$,1,(temp%-1))
'print "proddir=" proddir$
rv% = Lot_CleanPath(proddir$)
fullpath$ = proddir$ + "acroread.exe"
if DoesFileExist(fullpath$, femExists) = 0 then
'Find same version of acroread dir with no files
IF GetSymbolValue(SYM_SINGLESMARTSUITE$) = gSMARTSUITE$ THEN
proddir$ = basedir$ + LdString(SID_DOC_DIR)
'proddir$ = basedir$ + LdString(SID_DOC_DIR) + LdString(SID_DOC_BOOK_DIR) proddir$ = basedir$ + LdString(SID_DOC_DIR) + LdString(SID_DOC_BOOK_DIR)
ELSE
proddir$ = GetSymbolValue(SYM_BASEDIR$) + LdString(SID_DOC_DIR)
END IF
End if
Else
IF GetSymbolValue(SYM_SINGLESMARTSUITE$) = gSMARTSUITE$ THEN
proddir$ = basedir$ + LdString(SID_DOC_DIR)
ELSE
proddir$ = GetSymbolValue(SYM_BASEDIR$) + LdString(SID_DOC_DIR)
END IF
END IF
ELSE
IF GetSymbolValue(SYM_SINGLESMARTSUITE$) = gSMARTSUITE$ THEN
proddir$ = basedir$ + LdString(SID_DOC_DIR)
ELSE
proddir$ = GetSymbolValue(SYM_BASEDIR$) + LdString(SID_DOC_DIR)
END IF
END IF
ELSE
IF GetSymbolValue(SYM_SINGLESMARTSUITE$) = gSMARTSUITE$ THEN
proddir$ = basedir$ + LdString(SID_DOC_DIR)
ELSE
proddir$ = GetSymbolValue(SYM_BASEDIR$) + LdString(SID_DOC_DIR)
END IF
END IF
SetSymbolValue "DOCDIR", proddir$
'print proddir$
END SELECT
END FUNCTION
'*************************************************************************
'** FUNCTION PrevVersionsDOC (prodno%, network$, direction$) AS STRING
'**
'** Purpose: This function is called only for SmartSUite. It is called
'** immediately after all the other product functions for
'** InitDOC are called. It allows SmartSuite to assess whether
'** there are older versions of products around.
'**
'** In Symbols :
'** Out Symbols:
'**
'** Arguments: All paremeters are **read only**.
'** prodno%: This is your prodno%. It is assigned to you by the
'** toolkit in the order in which you were registered.
'** When your product is part of SmartSuite, SmartSuite
'** will always be product #1. (prodno% >=1)
'** network$: gSTANDARD | gSERVER | gNODE | gDISTRIBTUION
'** direction$: gNEXT | gBACK (If gBACK, and you are showing UI)
'** then step backwards
'**
'** direction$: gNEXT | gBACK (If gBACK, and you are showing UI)
'** then step backwards, i.e start at your last dialog
'** first.
'**
'** Errors: No return code for errors, you must Raise them
'** Author: MMeth
'** Returns: return: gNEXT | gBACK (If you are showing UI and you
'** allow the user to step backwards.)
'**
'*************************************************************************
PUBLIC FUNCTION PrevVersionsDOC (prodno%, network$, direction$) AS STRING
DIM nProducts%, prodIndex%, i%
nProducts% = Reg_GetNumberOfProducts()
FOR prodIndex% = 1 to nProducts%
If Reg_GetPreviousVersion(prodIndex%) <> "" Then
i% = DoMsgBox("Older Versions Found","", MB_OK)
GOTO PREVPRODFOUND
End If
NEXT
PREVPRODFOUND:
END FUNCTION
'*************************************************************************
'** FUNCTION PathChangeDOC (prodno%, network$, direction$, destdirsym$, mainprodsonly%) AS STRING
'**
'** Purpose: This function is called whenever the user proposes changes
'** to a path for your product. By the time this function calls
'** you, the paths have already been checked syntactically, and
'** the directory has been checked to see that it is writeable.
'** Your obligation is to verify that the proposed new path is ok
'** with you. If not, put up a Lotus Script :"MESSAGEBOX"
'** telling the user and return gBACK.
'**
'** In Symbols :
'** Out Symbols:
'**
'** Arguments: All paremeters are **read only**.
'** prodno%: This is your prodno%. It is assigned to you by the
'** toolkit in the order in which you were registered.
'** When your product is part of SmartSuite, SmartSuite
'** will always be product #1. (prodno% >=1)
'** network$: gSTANDARD | gSERVER | gNODE | gDISTRIBTUION
'** direction$: gNEXT | gBACK (If gBACK, and you are showing UI)
'** then step backwards
'** destdirsym$: The destdir symbol that has changed. e.g. "DOCDIR"
'** mainprodsonly%: (TRUE | FALSE) , when TRUE this means that only
'** your top level product directory should change,
'** probably "DOCDIR". When it is false, it means that
'** all related directories should change. It is **YOUR
'** RESPONSIBILITY** to implement this functionality.
'**
'** Errors: No return code for errors, you must Raise them
'** Author: MMeth
'** Returns: return: gNEXT | gBACK (If you are showing UI and you
'** allow the user to step backwards.)
'**
'*************************************************************************
PUBLIC FUNCTION PathChangeDOC (prodno%, network$, direction$, destdirsym$, mainprodsonly%) AS STRING
DIM path$
PathChangeDOC = gNEXT
path$ = GetSymbolValue ("DOCDIR")
'SUIT If network$ <> gDISTRIBUTION then
'SUIT
'SUIT IF IsLongDirPath(path$) = TRUE THEN
'SUIT '** output "FAT path only" dialog
'SUIT ErrorMsg SID_DOC_LONGDIRPATHINVALID, ""
'SUIT PathChangeDOC = gBACK
'SUIT EXIT FUNCTION
'SUIT ELSE
'SUIT IF Lot_IsUnvalidatedUNCPath(path$) = TRUE THEN
'SUIT '** output "NO UNC" paths dialog
'SUIT ErrorMsg SID_DOC_UNCPATHINVALID, ""
'SUIT PathChangeDOC = gBACK
'SUIT EXIT FUNCTION
'SUIT ELSE
'SUIT PathChangeDOC = gNEXT
'SUIT End if
'SUIT End IF
'SUIT END If
'' The following is a psudocode example
''''''rc$ = DetectVersionPriorToDarwin(path$)
''''''If rc$ = "BEAGLE" then
'''''' ShowPathError SID_BEAGLE_FOUND, SID_ERR_EXISTBEAGLE, path$
'''''' PathChangeDOC = gBACK
''''''end if
END FUNCTION
'*************************************************************************
'** FUNCTION InitCopyListDOC (prodno%, network$, direction$) AS STRING
'**
'** Purpose: Product must Initialize the copylist
'**
'** Must Do: You must initialize the copy list. However,
'** ======= if you leave the code as is (don't touch it at all),
'** it will probably work for you. Copy list must be initialized.
'** CAUTION: Make sure that your toplevel section in the
'** acronym.SCR has a keyword of "acronymTOP"
'**
'** In Symbols :
'** Out Symbols:
'**
'** Arguments: All paremeters are **read only**.
'** prodno%: This is your prodno%. It is assigned to you by the
'** toolkit in the order in which you were registered.
'** When your product is part of SmartSuite, SmartSuite
'** will always be product #1. (prodno% >=1)
'** network$: gSTANDARD | gSERVER | gNODE | gDISTRIBTUION
'** direction$: gNEXT | gBACK (If gBACK, and you are showing UI)
'** then step backwards
'**
'** Errors: No return code for errors, you must Raise them
'** Author: MMeth
'** Returns: return: gNEXT | gBACK (If you are showing UI and you
'** allow the user to step backwards.)
'**
'*************************************************************************
PUBLIC FUNCTION InitCopyListDOC (prodno%, network$, direction$) AS STRING
DIM i%, sym$, chpt$, nextprod$, notused%, FeatureToFind$
DIM bookchapter$, turnoff%, book$, TempString$, chapter$
ON Error STFQUIT GOTO COPYLISTERROR
'' ****** Language Install Code ******
'' For each component that will have language subdirectories for the
'' non-primary language, set the symbols appropriately
If GetSymbolValue(SYM_INSTALLKINDS$) = gLANGUAGEINSTALL$ Then
'For content, that will have separate subdirectories for non-primary language
'versions, call this function for a language install
SetLanguageSubdir "DOCLANGDIR", "DOCDIR"
Else
'For non-language install, they will all go into the same directory
'same directory, for example:
SetSymbolValue "DOCLANGDIR", GetSymbolValue("DOCDIR")
End if
InitCopyListDOC = direction$
'' In the backwards case, keep backing up
If direction$ = gBACK Then
EXIT FUNCTION
End If
sym$ = Reg_GetProductAcronym(prodno%) + gTOP$
chpt$ = Lot_GetChapterFromKeyWord(sym$)
If chpt$ = "" Then
ERROR STFQUIT
End IF
SELECT CASE Reg_GetProdSelectedInstallType(prodno%)
CASE gCOMPLETE$
i% = F_COMPLETE
CASE gLAPTOP$
i% = F_LAPTOP
CASE gCUSTOM$
i% = F_CUSTOM
END SELECT
Lot_InitializeCopyList chpt$, i%
'jhs: set the books off in standard case
if network$ = gSERVER$ then
'turn off tab section
bookchapter$ = Lot_GetChapterFromKeyWord("DOCBOOKS_TAB")
turnoff% = Lot_SetChapterFilesInCopyListInOrOut(bookchapter$,1)
'turn off parent section
bookchapter$ = Lot_GetChapterFromKeyWord("DOCBOOKS")
turnoff% = Lot_SetChapterFilesInCopyListInOrOut(bookchapter$,1)
for i% = 1 to 9
book$ = "DOCBOOK_" + CSTR(i%)
bookchapter$ = Lot_GetChapterFromKeyWord(book$)
turnoff% = Lot_SetChapterFilesInCopyListInOrOut(bookchapter$,1)
NEXT
end if
'' JH for Org DocOnline, don't install uninstall if reader is not installed
IF network$ = gSTANDARD$ THEN
IF FIsKeywordInCopyList("DOCFILES") = 0 THEN
TempString$ = "WIN32SHRUINST"
chapter$ = Lot_GetChapterFromKeyword(TempString$)
notused% = Lot_SetChapterFilesInCopyListInOrOut( chapter$, 0 )
TempString$ = "WIN32SHRUINSTLANGEN"
chapter$ = Lot_GetChapterFromKeyword(TempString$)
notused% = Lot_SetChapterFilesInCopyListInOrOut( chapter$, 0 )
TempString$ = "DOCWINDIR"
chapter$ = Lot_GetChapterFromKeyword(TempString$)
notused% = Lot_SetChapterFilesInCopyListInOrOut( chapter$, 0 )
TempString$ = "DOCHELP"
chapter$ = Lot_GetChapterFromKeyword(TempString$)
notused% = Lot_SetChapterFilesInCopyListInOrOut( chapter$, 0 )
END IF
END IF
'** Make sure to turn off all sections not available on the server.
'If network$ = gNODE Then
' nextprod$ = Lot_GetNextSibling(chpt$, F_NOTHING)
' chpt$ = Lot_GetFirst(chpt$, F_KEYWORD)
' WHILE (chpt$ <> "" AND chpt$ <> nextprod$)
' FeatureToFind$ = Lot_GetChapterValStr(chpt$, F_KEYWORD)
' If Lot_IsTheFeatureInstalled(FeatureToFind$) = FALSE Then
' notused% = Lot_SetChapterFilesInCopyListInOrOut (chpt$, 0)
' End If
'
' chpt$ = Lot_GetNext()
' WEND
'End If
EXIT FUNCTION
COPYLISTERROR:
ErrorMsg 0, "Developers: You need to have licenser section with DOCTOP in INF file"
ERROR STFQUIT
END FUNCTION
'*************************************************************************
'** FUNCTION UIDOC (prodno%, network$, direction$) AS STRING
'**
'** Purpose: This is your chance to put up any User Interface
'** that you want. Remember, try to keep it short.
'** In SmartSuite, if every product puts up two extra
'** dialogs, then the SmartSuite will consist of 16 dialogs!
'**
'** Pay attention to the value of direction, if you are putting
'** up more than one dialog.
'**
'** The toolkit will do an accurate space computation later,
'** so you can tamper with the copy list. But you shouldn't
'** write out anything to the disk until PostCopyCofig!
'**
'** In Symbols :
'** Out Symbols:
'**
'** Arguments: All paremeters are **read only**.
'** prodno%: This is your prodno%. It is assigned to you by the
'** toolkit in the order in which you were registered.
'** When your product is oart of SmartSuite, SmartSuite
'** will always be product #1. (prodno% >=1)
'** network$: gSTANDARD | gSERVER | gNODE | gDISTRIBTUION
'** direction$: gNEXT | gBACK (If gBACK, and you are showing UI)
'** then step backwards
'**
'** Errors: No return code for errors, you must Raise them
'** Author: MMeth
'** Returns: return: gNEXT | gBACK (If you are showing UI and you
'** allow the user to step backwards.)
'**
'*************************************************************************
PUBLIC FUNCTION UIDOC (prodno%, network$, direction$) AS STRING
DIM notused%, chpt$
UIDOC = direction$
'' In the backwards case, keep backing up
If direction$ = gBACK Then
EXIT FUNCTION
End If
'' OUT FOR ORG DOCONLINE
'' if Reg_GetObsFiles (prodno%) = 1 AND _
'' GetSymbolValue (SYM_SINGLESMARTSUITE$) <> gSMARTSUITE$ AND _
'' network$ = gSTANDARD$ _
'' then
'' notused% = RegisterCallback("DOC", "DOCRemoveProdFilesCB")
'' direction$ = PopupModalDlg (DBDOC_REMOVEPRODFILES, DBDOC_REMOVEPRODFILES)
'* the callback did the work, on both IDC_OK and IDC_BACK we
'* actually want to go next
if direction$ = gBACK then
direction$ = gNEXT
end if
'' end if
END FUNCTION
'*************************************************************************
'** FUNCTION PreCopyConfigDOC (prodno%, network$, direction$, lic%) AS STRING
'**
'** Purpose: This is the very last function called before the space is
'** accurately computed (to the last byte) and files are copied
'** by the toolkit. If you have any last minute changes to
'** do, this is the time to do them. example:
'** Test for monitor resolution, and turn on the chapter
'** in the copy list (a memory residident version of the INF file)
'** with the appropriate resolution.
'**
'** In Symbols :
'** Out Symbols:
'**
'** Arguments: All paremeters are **read only**.
'** prodno%: This is your prodno%. It is assigned to you by the
'** toolkit in the order in which you were registered.
'** When your product is part of SmartSuite, SmartSuite
'** will always be product #1. (prodno% >=1)
'** network$: gSTANDARD | gSERVER | gNODE | gDISTRIBTUION
'** direction$: gNEXT | gBACK (If gBACK, and you are showing UI)
'** then step backwards
'** lic%: TRUE | FALSE; TRUE licensing is turned on else it is off
'**
'** Errors: No return code for errors, you must Raise them
'** Author: MMeth
'** Returns: return: gNEXT | gBACK (If you are showing UI and you
'** allow the user to step backwards.)
'**
'*************************************************************************
PUBLIC FUNCTION PreCopyConfigDOC (prodno%, network$, direction$, lic%) AS STRING
PreCopyConfigDOC = gNEXT
END FUNCTION
'*************************************************************************
'** FUNCTION AddTheBillBoardsDOC (prodno%, network$, direction$, nbytes&)
'**
'** Purpose: This is where to add the billboards using the function:
'** AddToBillboardList. Use nbytes& as the last parameter to
'** the MS-SETUP function AddToBillboardList
'**
'** In Symbols :
'** Out Symbols:
'**
'** Arguments: All paremeters are **read only**.
'** prodno%: This is your prodno%. It is assigned to you by the
'** toolkit in the order in which you were registered.
'** When your product is part of SmartSuite, SmartSuite
'** will always be product #1. (prodno% >=1)
'** network$: gSTANDARD | gSERVER | gNODE | gDISTRIBTUION
'** direction$: gNEXT | gBACK (If gBACK, and you are showing UI)
'** then step backwards
'** nbytes: Determines the duration of billboard timing.
'** NOTE: Make sure to use billboard Ids that are unique to
'** your product. e.g. IDD_DOCBILLBD1_BMP &
'** DB_DOCBILLBD1_BMP
'**
'** Errors: No return code for errors, you must Raise them
'** Author: MMeth
'** Returns: return: gNEXT | gBACK (If you are showing UI and you
'** allow the user to step backwards.)
'**
'*************************************************************************
PUBLIC FUNCTION AddTheBillBoardsDOC (prodno%, network$, direction$, nbytes&) AS STRING
AddTheBillBoardsDOC = direction$
'' In the backwards case, keep backing up
If direction$ = gBACK Then
EXIT FUNCTION
End If
END FUNCTION
'*************************************************************************
'** FUNCTION PostCopyConfigDOC (prodno%, network$, direction$, programgroup$) AS STRING
'**
'** Purpose: This is called just after file copy has completed.
'** This is your opportunity to do all the configuaration
'** you need. This includes:
'**
'** 1. Writing to all your ini files
'** Don't worry about ini files related to shared components
'** 2. Writing to OLE registration database
'** Don't worry about OLE registration related to shared
'** components
'** 3. Writing to any other config files you may support
'** 4. Writing out user registration information,
'** no matter how your product picks up this info
'** 5. Create any working directories
'** A working directory is one that does not contain any
'** files, thus the toolkit did not create it for you.
'**
'** NOTE: THERE are many subtleties in here if you are
'** dealing with node and CD installs. In particular,
'** you must be ***very*** careful to understand where the
'** things are that you are pointing to. They could
'** be on the node, server, or CD! This, in combination
'** with the INF file for Server/Node, is probably the
'** trickiest part of writing a quality install. When
'** configuring, you must be careful to consider what
'** happens if there is a pre-existing product on the
'** machine, in the same location or
'** another one! This is very very tricky. What happens
'** if you had a full installation previously in location C:\FOO
'** and now the user is installing a minimum installation in loaction
'** D:\FOO.
'**
'** Each and every thing you do for configuartion needs very
'** careful thought.
'**
'** WE support a function Lot_WhereIsFeature("FeatureID")
'** This currrently tells you the location of a feature
'** if the feature appears both in the SERVER.INF and the
'** NODE.INF referred to by the same Keyword ID.
'** We do not support CDs with this command yet, but we will
'** at some time.
'**
'** Also look out for writing to a file when the directory
'** doesn't exist. If the user deselected one of your
'** options, your install may still be running, but since
'** there were no files to copy into the directory
'** it wasn't created by the toolkit!
'**
'** Finally, remember that configuration files generally
'** hold the state that the user has customized earlier.
'** Sometimes you don't want to overwrite these!
'** You will primarily use three MS-SETUP functions
'** in here:
'** 1. CreateIniKeyValue (writing to ini files)
'** 2. SetRegKeyValue (writing to OLE reg DB)
'**
'** CreateProgmanGroup & ShowProgmanGroup are
'** done for you by the time you reach this
'** function.
'**
'** You will not have to do any configuration of LOTUS SHARED
'** tools. The toolkit will do this for you.
'** In Symbols :
'** Out Symbols:
'**
'** Arguments: All paremeters are **read only**.
'** prodno%: This is your prodno%. It is assigned to you by the
'** toolkit in the order in which you were registered.
'** When your product is part of SmartSuite, SmartSuite
'** will always be product #1. (prodno% >=1)
'** network$: gSTANDARD | gSERVER | gNODE | gDISTRIBTUION
'** direction$: gNEXT | gBACK (If gBACK, and you are showing UI)
'** then step backwards
'** programgroup$: The name of the program group where the user chose to
'** install the program manager icons
'**
'** Errors: No return code for errors, you must Raise them
'** Author: MMeth
'** Returns: return: gNEXT
'**
'*************************************************************************
PUBLIC FUNCTION PostCopyConfigDOC (prodno%, network$, direction$, programgroup$) AS STRING
DIM ripath$, notused%, acroinipath$, wininipath$, DOCDIR$, acropath$, windir$
DIM docpersonal$, Lotusinipath$
PostCopyConfigDOC = direction$
'' In the backwards case, keep backing up
If direction$ = gBACK Then
EXIT FUNCTION
End If
If network$ <> gNODE$ Then
SetSymbolValue SYM_CDDRIVE$, GetSymbolValue(SYM_INSTALL_SOURCE)
End If
If network$ = gSERVER$ OR network$ = gDISTRIBUTION Then
GOTO SKIPCONFIG
End If
if Lot_IsTheFeatureInstalled ("DOCFILES") <> FALSE then
DOCDIR$ = Lot_WhereIsFeature(prodno%, "DOCFILES", "acroread.exe")
acropath$ = DOCDIR$ + "acroread.exe"
'** write entries in win.ini for atm
windir$ = GetWindowsDir()
wininipath$ = windir$ + "win.ini"
CreateIniKeyValue wininipath$, LdString(SID_DOC_DISPLAY), "UseGDI", "1", cmoOverwrite
CreateIniKeyValue wininipath$, LdString(SID_DOC_EXTENSIONS), "PDF", acropath$ + " ^.PDF", cmoOverwrite
'** write entries in acroread.ini
DOCDIR$ = Lot_WhereIsFeature(prodno%, "DOCFILES", "acroread.exe")
if DOCDIR$ <> "" then
acroinipath$ = windir$ + "acroread.ini"
if DoesFileExist(acroinipath$, femExists) then
docpersonal$ = Lot_TrimEndSlash(DOCDIR$)
CreateIniKeyValue acroinipath$, "AdobeViewer", "User", GetSymbolValue(SYM_NAME$), cmoOverwrite
CreateIniKeyValue acroinipath$,"Directories","Personal",docpersonal$,cmoOverwrite
end if
Lotusinipath$ = GetWindowsDir() + "lotus.ini"
If network$ = gNode$ then
docpersonal$ = GetSymbolValue(SYM_STF_SRCDIR$) + "acroread"
End if
'**** Write product specific registry keys
AddRegistryKeysDOC prodno%, network$
'**
'** Write the uninstaller - but only for the primary language
if network$ = gSTANDARD$ then
if GetSymbolValue(SYM_INSTALLKIND$) <> gLANGUAGEINSTALL$ then
notused% = Lot_RegisterUninstaller ( _
LdString (SID_DOC_PROD_NAME),_
LdString (SID_DOC_PROD_VER),_
LdString (SID_DOC_COMMERCIALNAME), _
MakePath(GetSymbolValue("INSTDIR"),"DOC.inf"),_
TRUE,_
FALSE,_
GetSymbolValue(SYM_INSTALL_LANGUAGE$),_
"","","")
end if
elseif network$ = gNODE$ then
if GetSymbolValue (SYM_SINGLESMARTSUITE$) = gSMARTSUITE$ then
if GetSymbolValue(SYM_INSTALLKIND$) <> gLANGUAGEINSTALL$ then
notused% = Lot_RegisterUninstaller ( _
LdString (SID_DOC_PROD_NAME),_
LdString (SID_DOC_PROD_VER),_
LdString (SID_DOC_COMMERCIALNAME), _
MakePath(GetSymbolValue("DOCDIR"),"DOCnode.inf"),_
TRUE,_
FALSE,_
GetSymbolValue(SYM_INSTALL_LANGUAGE$),_
"","","")
end if
else
if GetSymbolValue(SYM_INSTALLKIND$) <> gLANGUAGEINSTALL$ then
notused% = Lot_RegisterUninstaller ( _
LdString (SID_DOC_PROD_NAME),_
LdString (SID_DOC_PROD_VER),_
LdString (SID_DOC_COMMERCIALNAME), _
MakePath(GetSymbolValue("DOCDIR"),"docnode.inf"),_
TRUE,_
FALSE,_
GetSymbolValue(SYM_INSTALL_LANGUAGE$),_
"","","")
end if
end if
end if
''****** Comment out the Lotus.ini stuff for now...
'' CreateIniKeyValue Lotusinipath$, "Lotus Applications", "DocOnline",_
'' docpersonal$ + LdString(SID_DOC_LTSINI_NAME) , cmoOverwrite
end if
end if
SKIPCONFIG:
END FUNCTION
'*************************************************************************
'** PUBLIC SUB AddRegistryKeysDOC (prodno%, network$)
'**
'** Purpose: This is called just after file copy has completed.
'** 1. Add product specific Registry Keys.
'**
'** Each and every thing you do for configuartion needs very
'** careful thought.
'**
'** In Symbols :
'** Out Symbols:
'**
'** Arguments: All paremeters are **read only**.
'** prodno%: This is your prodno%. It is assigned to you by the
'** toolkit in the order in which you were registered.
'** When your product is part of SmartSuite, SmartSuite
'** will always be product #1. (prodno% >=1)
'** network$: gSTANDARD | gSERVER | gNODE | gDISTRIBTUION
'** direction$: gNEXT | gBACK (If gBACK, and you are showing UI)
'** then step backwards
'** programgroup$: The name of the program group where the user chose to
'** install the program manager icons
'**
'** Errors: No return code for errors, you must Raise them
'** Author: PMD
'**
'*************************************************************************
PUBLIC SUB AddRegistryKeysDOC (prodno%, network$)
DIM LocPath$, Filename$, descript$, gbuf$, instvalue&,nLength&,installfrom$
DIM szkey$, szkey2$, nsize&, nsize1&,nsize2&,Insttype$,nsize3,installPath$
DIM RegStatus&, keyvalue$, keyvalue1$,keyvalue2$, keyvalue3$, keyvalue4$
DIM exe$, szPath2$,szPath$,docdir$,bookpath$,notused%,nNameLength&,szExeName$
DOC_RegisterSharedComponent "WIN32SHRUINST", "Uninstall", "1.0"
DOC_RegisterSharedComponent "WIN32SHRUINSTLANGEN", "Uninstall", "1.0"
docdir$ = Lot_WhereIsFeature(prodno%, "DOCFILES", "acroread.exe")
'print "DOCDIR=" docdir$
' Doc main level registry stuff.
if Lot_IsTheFeatureInstalled ("DOCFILES") <> FALSE then
installfrom$ = GetSymbolValue(SYM_STF_SRCDIR$)
'print "Addregkey= " installfrom$
szKey$ = LdString(SID_DOC_REGISTRY_KEY)
regStatus& = Lot_RegCreateKeyEx (HKEY_LOCAL_MACHINE, szKey$)
' If network$ = gNODE$ or network$ = gSERVER$ Then
If network$ = gNODE$ Then
'print "net type in node Addreg=" network$
'If server install PDFpath and Path are the same
szPath2$ = GetSymbolValue ("DOCDIRNAME")
'print"This is DOCDIR=" szPath2$
'** Path
szExeName$ = LdString(SID_DOC_DOCEXE)
nNameLength& = len (szExeName$) + 1
szPath$ = GetSymbolValue(SYM_STF_SRCDIR$)
'szPath$ = Lot_TrimEndSlash (szPath$)
nLength& = len (szPath$) + 1
regStatus = regStatus + Lot_CreateRegKeyValueEx (HKEY_LOCAL_MACHINE, szKey$, _
LdString(SID_DOC_REGISTRY_PATH), REG_SZ, szPath$, nLength&)
installPath$ = szPath$
regStatus = regStatus + Lot_CreateRegKeyValueEx (HKEY_LOCAL_MACHINE, szKey$, _
"Name", REG_SZ, szExeName$, nNameLength&)
'** Register for uninstaller.
'' notused% = Lot_RegisterObject("DOCTOP", UNIN_CLASS_REGISTRY_HIVE$, _
'' "HKEY_LOCAL_MACHINE\"+ szKey$)
'** PDFpath
bookpath$ = LdString(SID_DOC_BOOK_DIR)
szPath$ = docdir$ + bookpath$
' szPath$ = Lot_TrimEndSlash (szPath$)
nLength& = len (szPath$) + 1
regStatus = regStatus + Lot_CreateRegKeyValueEx (HKEY_LOCAL_MACHINE, szKey$, _
LdString(SID_DOC_REGISTRY_PDFPATH), REG_SZ, szPath$, nLength&)
installPath$ = szPath$
Lot_RegisterObject "DOCTOP",UNIN_CLASS_REGISTRY_HIVE$,"HKEY_CLASSES_ROOT\.PDF"
Else
'** Path
szExeName$ = LdString(SID_DOC_DOCEXE)
nNameLength& = len (szExeName$) + 1
szPath$ = GetSymbolValue ("DOCDIR")
' szPath$ = Lot_TrimEndSlash (szPath$)
nLength& = len (szPath$) + 1
regStatus = regStatus + Lot_CreateRegKeyValueEx (HKEY_LOCAL_MACHINE, szKey$, _
LdString(SID_DOC_REGISTRY_PATH), REG_SZ, szPath$, nLength&)
installPath$ = szPath$
regStatus = regStatus + Lot_CreateRegKeyValueEx (HKEY_LOCAL_MACHINE, szKey$, _
"Name", REG_SZ, szExeName$, nNameLength&)
'** Register for uninstaller.
'' notused% = Lot_RegisterObject("DOCTOP", UNIN_CLASS_REGISTRY_HIVE$, _
'' "HKEY_LOCAL_MACHINE\"+ szKey$)
'** PDFpath
bookpath$ = LdString(SID_DOC_BOOK_DIR)
szPath$ = MakePath(GetSymbolValue(SYM_STF_SRCDIR$),bookpath$)
' print "DIDIRNAME=" GetSymbolValue ("DOCDIRNAME")
'' ' print "proddir=" proddir$
'szPath$ = Lot_TrimEndSlash (szPath$)
nLength& = len (szPath$) + 1
regStatus = regStatus + Lot_CreateRegKeyValueEx (HKEY_LOCAL_MACHINE, szKey$, _
LdString(SID_DOC_REGISTRY_PDFPATH), REG_SZ, szPath$, nLength&)
installPath$ = szPath$
Lot_RegisterObject "DOCTOP",UNIN_CLASS_REGISTRY_HIVE$,"HKEY_CLASSES_ROOT\.PDF"
End If
' ** extension association - HCR
exe$ = DOCDIR$ + LdString(SID_DOC_DOCEXE) + " " + "%1"
szKey$ = LdString(SID_DOC_EXTENSION_NAME) + "\" + LdString(SID_DOC_SHELL) + "\" + LdString(SID_DOC_OPEN) + "\" + LdString(SID_DOC_COMMAND)
' regStatus& = Lot_RegCreateKeyEx (HKEY_CLASSES_ROOT, szKey$)
szPath$ = LdString(SID_DOC_DOL)
nLength& = len (exe$) + 1
regStatus = Lot_CreateRegKeyValueEx (HKEY_CLASSES_ROOT, szKey$, _
LdString(SID_DOC_DEFAULT), REG_SZ, exe$, nLength&)
end if 'main level check
END SUB
'*************************************************************************
'** FUNCTION AddIconsDOC (prodno%, network$, direction$, programgroup$) AS STRING
'**
'** Purpose: This is called just after file copy has completed.
'** 1. Add program manager icons of those features
'** that were installed.
'** NOTE: THERE are many subtleties in here if you are
'** dealing with node and CD installs. In particular,
'** you must be ***very*** careful to understand where the
'** things are that you are pointing to. They could
'** be on the node, server, or CD! This, in combination
'** with the INF file for Server/Node, is probably the
'** trickiest part of writing a quality install. When
'** configuring, you must be careful to consider what
'** happens if there is a pre-existing product on the
'** machine, in the same location or
'** another one! This is very very tricky. What happens
'** if you had a full installation previously in location C:\FOO
'** and now the user is installing a minimum installation in loaction
'** D:\FOO.
'**
'** Each and every thing you do for configuartion needs very
'** careful thought.
'**
'** WE support a function Lot_WhereIsFeature("FeatureID")
'** This currrently tells you the location of a feature
'** if the feature appears both in the SERVER.INF and the
'** NODE.INF referred to by the same Keyword ID.
'** We do not support CDs with this command yet, but we will
'** at some time.
'**
'** Also look out for writing to a file when the directory
'** doesn't exist. If the user deselected one of your
'** options, your install may still be running, but since
'** there were no files to copy into the directory
'** it wasn't created by the toolkit!
'**
'** Finally, remember that configuration files generally
'** hold the state that the user has customized earlier.
'** Sometimes you don't want to overwrite these!
'** You will primarily use three MS-SETUP functions
'** in here:
'** 1. CreateProgmanItem (writing to progman)
'**
'** CreateProgmanGroup & ShowProgmanGroup are
'** done for you by the time you reach this
'** function.
'**
'** You will not have to do any configuration of LOTUS SHARED
'** tools. The toolkit will do this for you.
'** In Symbols :
'** Out Symbols:
'**
'** Arguments: All paremeters are **read only**.
'** prodno%: This is your prodno%. It is assigned to you by the
'** toolkit in the order in which you were registered.
'** When your product is part of SmartSuite, SmartSuite
'** will always be product #1. (prodno% >=1)
'** network$: gSTANDARD | gSERVER | gNODE | gDISTRIBTUION
'** direction$: gNEXT | gBACK (If gBACK, and you are showing UI)
'** then step backwards
'** programgroup$: The name of the program group where the user chose to
'** install the program manager icons
'**
'** Errors: No return code for errors, you must Raise them
'** Author: MZ
'** Returns: return: gNEXT
'**
'*************************************************************************
PUBLIC FUNCTION AddIconsDOC (prodno%, network$, direction$, programgroup$) AS STRING
DIM ripath$,notused%
DIM installsourcedrive$, book$, ondisklocation$, oncdlocation$
DIM bookcount%, filebooktitle$, progmanbooktitle$
DIM docprogramgroup$, linkfolder%
AddIconsDOC = direction$
'' In the backwards case, keep backing up
If direction$ = gBACK Then
EXIT FUNCTION
End If
If network$ = gSERVER$ OR network$ = gDISTRIBUTION Then
GOTO SKIPCONFIG
End If
if network$ = gSTANDARD$ then
installsourcedrive$ = GetSymbolValue(SYM_STF_SRCDIR$)
oncdlocation$ = installsourcedrive$ + LdString(SID_DOC_BOOK_DIR)
End if
if network$ = gNODE$ then
installsourcedrive$ = GetSymbolValue(SYM_STF_SRCDIR$)
oncdlocation$ = installsourcedrive$ + LdString(SID_DOC_BOOK_DIR)
' print "oncdlocation=" oncdlocation$
End if
ondisklocation$ = Lot_WhereIsFeature(prodno%,"DOCFILES","acroread.exe")
' print "ondisklocale=" ondisklocation$
'*** for book 1
filebooktitle$ = LdString(SID_DOC_BOOKTITLE_1)
progmanbooktitle$ = LdString(SID_DOC_PROGMAN_BOOKTITLE_1)
if Lot_IsTheFeatureInstalled("DOCBOOK_1") <> FALSE then
if IsNewShell() Then
linkfolder% = Lot_AddLinkToFolder ( prodno%, ondisklocation$_
+ LdString(SID_DOC_BOOK_DIR) + filebooktitle$,_
LdString(SID_DOC_FOLDER) + progmanbooktitle$+ ".lnk", "DocOnLine",_
"", ondisklocation$)
'' linkfolder% = Lot_AddLinkToFolder ( prodno%, ondisklocation$ + "acroread.exe ",_
'' LdString(SID_DOC_FOLDER) + progmanbooktitle$+ ".lnk", "DocOnLine",_
'' ondisklocation$ + LdString(SID_DOC_BOOK_DIR) + filebooktitle$, ondisklocation$)
'** Register the smartsuite folder link for uninstall.
notused% = Lot_RegisterObject ("DOCTOP", UNIN_CLASS_SHORTCUT$, _
Lot_GetProgFolder (1) + LdString(SID_DOC_FOLDER) + progmanbooktitle$+ ".lnk")
else
IF Lot_IsTheFeatureInstalled("DOCFILES") <> FALSE THEN
CreateProgmanItem docprogramgroup$, progmanbooktitle$, ondisklocation$_
+ "acroread.exe" + " " + ondisklocation$ + LdString(SID_DOC_BOOK_DIR)_
+ filebooktitle$, "", cmoOverwrite
END IF
end if
else
if IsNewShell() Then
'' linkfolder% = Lot_AddLinkToFolder ( prodno%,ondisklocation$ + "acroread.exe ", _
'' LdString(SID_DOC_FOLDER) + progmanbooktitle$+".lnk", "DocOnLine",_
'' oncdlocation$ + filebooktitle$ , ondisklocation$)
linkfolder% = Lot_AddLinkToFolder ( prodno%, oncdlocation$_
+ filebooktitle$, LdString(SID_DOC_FOLDER) + progmanbooktitle$_
+ ".lnk", "DocOnLine", "", "")
'** Register the smartsuite folder link for uninstall.
notused% = Lot_RegisterObject ("DOCTOP", UNIN_CLASS_SHORTCUT$, _
Lot_GetProgFolder (1) + LdString(SID_DOC_FOLDER) + progmanbooktitle$+ ".lnk")
else
IF Lot_IsTheFeatureInstalled("DOCFILES") <> FALSE THEN
CreateProgmanItem docprogramgroup$, progmanbooktitle$, ondisklocation$_
+ "acroread.exe" + " " + oncdlocation$ + filebooktitle$, "", cmoOverwrite
END IF
end if
end if
'*** for book 2
filebooktitle$ = LdString(SID_DOC_BOOKTITLE_2)
progmanbooktitle$ = LdString(SID_DOC_PROGMAN_BOOKTITLE_2)
if Lot_IsTheFeatureInstalled("DOCBOOK_2") <> FALSE then
if IsNewShell() Then
'' linkfolder% = Lot_AddLinkToFolder ( prodno%,ondisklocation$ + "acroread.exe ",_
'' LdString(SID_DOC_FOLDER) + progmanbooktitle$+".lnk", "DocOnLine",_
'' ondisklocation$ + LdString(SID_DOC_BOOK_DIR) + filebooktitle$, oncdlocation$)
linkfolder% = Lot_AddLinkToFolder ( prodno%, ondisklocation$_
+ LdString(SID_DOC_BOOK_DIR) + filebooktitle$,_
LdString(SID_DOC_FOLDER) + progmanbooktitle$+ ".lnk", "DocOnLine",_
"", ondisklocation$)
'** Register the smartsuite folder link for uninstall.
notused% = Lot_RegisterObject ("DOCTOP", UNIN_CLASS_SHORTCUT$, _
Lot_GetProgFolder (1) + LdString(SID_DOC_FOLDER) + progmanbooktitle$+ ".lnk")
else
IF Lot_IsTheFeatureInstalled("DOCFILES") <> FALSE THEN
CreateProgmanItem docprogramgroup$, progmanbooktitle$, ondisklocation$_
+ "acroread.exe" + " " + ondisklocation$ + LdString(SID_DOC_BOOK_DIR)_
+ filebooktitle$, "", cmoOverwrite
END IF
end if
else
if IsNewShell() Then
'' linkfolder% = Lot_AddLinkToFolder ( prodno%,ondisklocation$ + "acroread.exe ", _
'' LdString(SID_DOC_FOLDER) + progmanbooktitle$+".lnk", "DocOnLine",_
'' oncdlocation$ + filebooktitle$ , ondisklocation$)
linkfolder% = Lot_AddLinkToFolder ( prodno%, oncdlocation$_
+ filebooktitle$, LdString(SID_DOC_FOLDER) + progmanbooktitle$_
+ ".lnk", "DocOnLine", "", "")
'** Register the smartsuite folder link for uninstall.
notused% = Lot_RegisterObject ("DOCTOP", UNIN_CLASS_SHORTCUT$, _
Lot_GetProgFolder (1) + LdString(SID_DOC_FOLDER) + progmanbooktitle$+ ".lnk")
else
IF Lot_IsTheFeatureInstalled("DOCFILES") <> FALSE THEN
CreateProgmanItem docprogramgroup$, progmanbooktitle$, ondisklocation$_
+ "acroread.exe" + " " + oncdlocation$ + filebooktitle$, "",_
cmoOverwrite
END IF
end if
end if
GOTO SKIPCONFIG
'*** for book 3
filebooktitle$ = LdString(SID_DOC_BOOKTITLE_3)
progmanbooktitle$ = LdString(SID_DOC_PROGMAN_BOOKTITLE_3)
if Lot_IsTheFeatureInstalled("DOCBOOK_3") <> FALSE then
if IsNewShell() Then
linkfolder% = Lot_AddLinkToFolder ( prodno%,ondisklocation$ + "acroread.exe ",_
LdString(SID_DOC_FOLDER) + progmanbooktitle$+".lnk", "DocOnLine",_
oncdlocation$ + filebooktitle$, ondisklocation$)
'** Register the smartsuite folder link for uninstall.
notused% = Lot_RegisterObject ("DOCTOP", UNIN_CLASS_SHORTCUT$, _
Lot_GetProgFolder (1) + LdString(SID_DOC_FOLDER) + progmanbooktitle$+ ".lnk")
else
CreateProgmanItem docprogramgroup$, progmanbooktitle$, ondisklocation$_
+ "acroread.exe" + " " + oncdlocation$ + filebooktitle$, "",_
cmoOverwrite
end if
else
if IsNewShell() Then
linkfolder% = Lot_AddLinkToFolder ( prodno%,ondisklocation$ + "acroread.exe ", _
LdString(SID_DOC_FOLDER) + progmanbooktitle$+".lnk", "DocOnLine",_
oncdlocation$ + filebooktitle$ , ondisklocation$)
'** Register the smartsuite folder link for uninstall.
notused% = Lot_RegisterObject ("DOCTOP", UNIN_CLASS_SHORTCUT$, _
Lot_GetProgFolder (1) + LdString(SID_DOC_FOLDER) + progmanbooktitle$+ ".lnk")
else
CreateProgmanItem docprogramgroup$, progmanbooktitle$, ondisklocation$_
+ "acroread.exe" + " " + oncdlocation$ + filebooktitle$, "",_
cmoOverwrite
end if
end if
'*** for book 4
filebooktitle$ = LdString(SID_DOC_BOOKTITLE_4)
progmanbooktitle$ = LdString(SID_DOC_PROGMAN_BOOKTITLE_4)
if Lot_IsTheFeatureInstalled("DOCBOOK_4") <> FALSE then
if IsNewShell() Then
linkfolder% = Lot_AddLinkToFolder ( prodno%,ondisklocation$ + "acroread.exe ",_
LdString(SID_DOC_FOLDER) + progmanbooktitle$+".lnk", "DocOnLine",_
oncdlocation$+ filebooktitle$, oncdlocation$)
'** Register the smartsuite folder link for uninstall.
notused% = Lot_RegisterObject ("DOCTOP", UNIN_CLASS_SHORTCUT$, _
Lot_GetProgFolder (1) + LdString(SID_DOC_FOLDER) + progmanbooktitle$+ ".lnk")
else
CreateProgmanItem docprogramgroup$, progmanbooktitle$, ondisklocation$_
+ "acroread.exe" + " " + oncdlocation$ + filebooktitle$, "",_
cmoOverwrite
end if
else
if IsNewShell() Then
linkfolder% = Lot_AddLinkToFolder ( prodno%,ondisklocation$ + "acroread.exe ", _
LdString(SID_DOC_FOLDER) + progmanbooktitle$+".lnk", "DocOnLine",_
oncdlocation$ + filebooktitle$ , ondisklocation$)
'** Register the smartsuite folder link for uninstall.
notused% = Lot_RegisterObject ("DOCTOP", UNIN_CLASS_SHORTCUT$, _
Lot_GetProgFolder (1) + LdString(SID_DOC_FOLDER) + progmanbooktitle$+ ".lnk")
else
CreateProgmanItem docprogramgroup$, progmanbooktitle$, ondisklocation$_
+ "acroread.exe" + " " + oncdlocation$ + filebooktitle$, "",_
cmoOverwrite
end if
end if
'*** for book 5
filebooktitle$ = LdString(SID_DOC_BOOKTITLE_5)
progmanbooktitle$ = LdString(SID_DOC_PROGMAN_BOOKTITLE_5)
if Lot_IsTheFeatureInstalled("DOCBOOK_5") <> FALSE then
if IsNewShell() Then
linkfolder% = Lot_AddLinkToFolder ( prodno%,ondisklocation$ + "acroread.exe ",_
LdString(SID_DOC_FOLDER) + progmanbooktitle$+".lnk", "DocOnLine",_
oncdlocation$+ filebooktitle$, ondisklocation$)
else
CreateProgmanItem docprogramgroup$, progmanbooktitle$, ondisklocation$_
+ "acroread.exe" + " " + oncdlocation$ + filebooktitle$, "",_
cmoOverwrite
end if
else
if IsNewShell() Then
linkfolder% = Lot_AddLinkToFolder ( prodno%,ondisklocation$ + "acroread.exe ", _
LdString(SID_DOC_FOLDER) + progmanbooktitle$+".lnk", "DocOnLine",_
oncdlocation$ + filebooktitle$ , ondisklocation$)
'** Register the smartsuite folder link for uninstall.
notused% = Lot_RegisterObject ("DOCTOP", UNIN_CLASS_SHORTCUT$, _
Lot_GetProgFolder (1) + LdString(SID_DOC_FOLDER) + progmanbooktitle$+ ".lnk")
else
CreateProgmanItem docprogramgroup$, progmanbooktitle$, ondisklocation$_
+ "acroread.exe" + " " + oncdlocation$ + filebooktitle$, "",_
cmoOverwrite
end if
end if
'*** for book 6
filebooktitle$ = LdString(SID_DOC_BOOKTITLE_6)
progmanbooktitle$ = LdString(SID_DOC_PROGMAN_BOOKTITLE_6)
if Lot_IsTheFeatureInstalled("DOCBOOK_6") <> FALSE then
if IsNewShell() Then
linkfolder% = Lot_AddLinkToFolder ( prodno%,ondisklocation$ + "acroread.exe ",_
LdString(SID_DOC_FOLDER) + progmanbooktitle$+".lnk", "DocOnLine",_
oncdlocation$+filebooktitle$, ondisklocation$)
'** Register the smartsuite folder link for uninstall.
notused% = Lot_RegisterObject ("DOCTOP", UNIN_CLASS_SHORTCUT$, _
Lot_GetProgFolder (1) + LdString(SID_DOC_FOLDER) + progmanbooktitle$+ ".lnk")
else
CreateProgmanItem docprogramgroup$, progmanbooktitle$, ondisklocation$_
+ "acroread.exe" + " " + oncdlocation$ + filebooktitle$, "",_
cmoOverwrite
end if
else
if IsNewShell() Then
linkfolder% = Lot_AddLinkToFolder ( prodno%,ondisklocation$ + "acroread.exe ", _
LdString(SID_DOC_FOLDER) + progmanbooktitle$+".lnk", "DocOnLine",_
oncdlocation$ + filebooktitle$ , ondisklocation$)
'** Register the smartsuite folder link for uninstall.
notused% = Lot_RegisterObject ("DOCTOP", UNIN_CLASS_SHORTCUT$, _
Lot_GetProgFolder (1) + LdString(SID_DOC_FOLDER) + progmanbooktitle$+ ".lnk")
else
CreateProgmanItem docprogramgroup$, progmanbooktitle$, ondisklocation$_
+ "acroread.exe" + " " + oncdlocation$ + filebooktitle$, "",_
cmoOverwrite
end if
end if
'*** for book 7
filebooktitle$ = LdString(SID_DOC_BOOKTITLE_7)
progmanbooktitle$ = LdString(SID_DOC_PROGMAN_BOOKTITLE_7)
if Lot_IsTheFeatureInstalled("DOCBOOK_7") <> FALSE then
if IsNewShell() Then
linkfolder% = Lot_AddLinkToFolder ( prodno%,ondisklocation$ + "acroread.exe ",_
LdString(SID_DOC_FOLDER) + progmanbooktitle$+".lnk", "DocOnLine",_
oncdlocation$+filebooktitle$, ondisklocation$)
'** Register the smartsuite folder link for uninstall.
notused% = Lot_RegisterObject ("DOCTOP", UNIN_CLASS_SHORTCUT$, _
Lot_GetProgFolder (1) + LdString(SID_DOC_FOLDER) + progmanbooktitle$+ ".lnk")
else
CreateProgmanItem docprogramgroup$, progmanbooktitle$, ondisklocation$_
+ "acroread.exe" + " " + oncdlocation$ + filebooktitle$, "",_
cmoOverwrite
end if
else
if IsNewShell() Then
linkfolder% = Lot_AddLinkToFolder ( prodno%,ondisklocation$ + "acroread.exe ", _
LdString(SID_DOC_FOLDER) + progmanbooktitle$+".lnk", "DocOnLine",_
oncdlocation$ + filebooktitle$ , ondisklocation$)
'** Register the smartsuite folder link for uninstall.
notused% = Lot_RegisterObject ("DOCTOP", UNIN_CLASS_SHORTCUT$, _
Lot_GetProgFolder (1) + LdString(SID_DOC_FOLDER) + progmanbooktitle$+ ".lnk")
else
CreateProgmanItem docprogramgroup$, progmanbooktitle$, ondisklocation$_
+ "acroread.exe" + " " + oncdlocation$ + filebooktitle$, "",_
cmoOverwrite
end if
end if
'*** for book 8
filebooktitle$ = LdString(SID_DOC_BOOKTITLE_8)
progmanbooktitle$ = LdString(SID_DOC_PROGMAN_BOOKTITLE_8)
if Lot_IsTheFeatureInstalled("DOCBOOK_8") <> FALSE then
if IsNewShell() Then
linkfolder% = Lot_AddLinkToFolder ( prodno%,ondisklocation$ + "acroread.exe ",_
LdString(SID_DOC_FOLDER) + progmanbooktitle$+".lnk", "DocOnLine",_
oncdlocation$+filebooktitle$, ondisklocation$)
'** Register the smartsuite folder link for uninstall.
notused% = Lot_RegisterObject ("DOCTOP", UNIN_CLASS_SHORTCUT$, _
Lot_GetProgFolder (1) + LdString(SID_DOC_FOLDER) + progmanbooktitle$+ ".lnk")
else
CreateProgmanItem docprogramgroup$, progmanbooktitle$, ondisklocation$_
+ "acroread.exe" + " " + oncdlocation$ + filebooktitle$, "",_
cmoOverwrite
end if
else
if IsNewShell() Then
linkfolder% = Lot_AddLinkToFolder ( prodno%,ondisklocation$ + "acroread.exe ", _
LdString(SID_DOC_FOLDER) + progmanbooktitle$+".lnk", "DocOnLine",_
oncdlocation$ + filebooktitle$ , ondisklocation$)
'** Register the smartsuite folder link for uninstall.
notused% = Lot_RegisterObject ("DOCTOP", UNIN_CLASS_SHORTCUT$, _
Lot_GetProgFolder (1) + LdString(SID_DOC_FOLDER) + progmanbooktitle$+ ".lnk")
else
CreateProgmanItem docprogramgroup$, progmanbooktitle$, ondisklocation$_
+ "acroread.exe" + " " + oncdlocation$ + filebooktitle$, "",_
cmoOverwrite
end if
end if
'*** for book 9
filebooktitle$ = LdString(SID_DOC_BOOKTITLE_9)
progmanbooktitle$ = LdString(SID_DOC_PROGMAN_BOOKTITLE_9)
if Lot_IsTheFeatureInstalled("DOCBOOK_9") <> FALSE then
if IsNewShell() Then
linkfolder% = Lot_AddLinkToFolder ( prodno%,ondisklocation$ + "acroread.exe ",_
LdString(SID_DOC_FOLDER) + progmanbooktitle$+".lnk", "DocOnLine",_
oncdlocation$+filebooktitle$, ondisklocation$)
'** Register the smartsuite folder link for uninstall.
notused% = Lot_RegisterObject ("DOCTOP", UNIN_CLASS_SHORTCUT$, _
Lot_GetProgFolder (1) + LdString(SID_DOC_FOLDER) + progmanbooktitle$+ ".lnk")
else
CreateProgmanItem docprogramgroup$, progmanbooktitle$, ondisklocation$_
+ "acroread.exe" + " " + oncdlocation$ + filebooktitle$, "",_
cmoOverwrite
end if
else
if IsNewShell() Then
linkfolder% = Lot_AddLinkToFolder ( prodno%,ondisklocation$ + "acroread.exe ", _
LdString(SID_DOC_FOLDER) + progmanbooktitle$+".lnk", "DocOnLine",_
oncdlocation$ + filebooktitle$ , ondisklocation$)
'** Register the smartsuite folder link for uninstall.
notused% = Lot_RegisterObject ("DOCTOP", UNIN_CLASS_SHORTCUT$, _
Lot_GetProgFolder (1) + LdString(SID_DOC_FOLDER) + progmanbooktitle$+ ".lnk")
else
CreateProgmanItem docprogramgroup$, progmanbooktitle$, ondisklocation$_
+ "acroread.exe" + " " + oncdlocation$ + filebooktitle$, "",_
cmoOverwrite
end if
end if
SKIPCONFIG:
END FUNCTION
'*************************************************************************
'** FUNCTION PostSuccessRegDOC (prodno%, network$, direction$) AS STRING
'**
'** Purpose: If you need to launch something after install runs
'** In Symbols :
'** Out Symbols:
'**
'** Arguments: All paremeters are **read only**.
'** prodno%: This is your prodno%. It is assigned to you by the
'** toolkit in the order in which you were registered.
'** When your product is part of SmartSuite, SmartSuite
'** will always be product #1. (prodno% >=1)
'** network$: gSTANDARD | gSERVER | gNODE | gDISTRIBTUION
'** direction$: gNEXT
'**
'** Errors: No return code for errors, you must Raise them
'** Author: MMeth
'** Returns: return: gNEXT
'**
'*************************************************************************
PUBLIC FUNCTION PostSuccessRegDOC (prodno%, network$, direction$) AS STRING
PostSuccessRegDOC = direction$
'' In the backwards case, keep backing up
If direction$ = gBACK Then
EXIT FUNCTION
End If
END FUNCTION
'********************************
'********************************
'** Product Specific Functions **
'********************************
'********************************
'*************************************************************************
'** FUNCTION GetDOCPathfromLotusIni() AS STRING
'**
'** Purpose: Gets the product dir path from Lotus.ini file, and searches for
'** acronym.exe in the product dir path.
'**
'** Author: JYOTI KEDIA, JMD
'** Arguments: None
'** Returns: if acronym.exe does not exist in dir specified in lotus.ini, it
'** returns "", otherwise returns the full path to the product.
'** NOTE: changed to not include product name by JMD
'** includes trailing backslash
'*************************************************************************
FUNCTION GetDOCPathfromLotusIni() AS STRING
DIM DestDir$, lotusinipath$, defdir$, temp%, ProdDir$, fullpath$, rv%
DIM szkey$, keyvalue$, nsize&, gbuf$, ret&
DestDir$ = GetWindowsDir()
lotusinipath$ = DestDir$ +"lotus.ini"
if DoesFileExist(lotusinipath$,femExists) then
defdir$ = GetIniKeyString(lotusinipath$,"Lotus Applications", "DocOnline")
if defdir$ <> "" then
temp% = INSTR(1,LCASE$(defdir$),"acroread.exe")
'print temp%
if temp% <> 0 then
ProdDir$ = MID$(defdir$,1,(temp%-1))
if ProdDir$ <> "" then
fullpath$ = ProdDir$ + "acroread.exe"
'print fullpath$
if DoesFileExist(fullpath$, femExists) then
rv% = Lot_CleanPath(fullpath$)
'print ProdDir$
GetDOCPathfromLotusIni = ProdDir$
EXIT FUNCTION
end if
end if
end if
end if
end if
GetDOCPathfromLotusIni = ""
END FUNCTION
'*************************************************************************
'** Purpose: Finds out the installed languages and determines the nature
'** of the install. If not running automated, displays a message box for
'** a language install
'**
'** Author: JMDonohue
'** Arguments: All parameters are **read only**.
'** prodno%: This is your prodno%. It is assigned to you by the
'** toolkit in the order in which you were registered.
'** When your product is part of SmartSuite, SmartSuite
'** will always be product #1. (prodno% >=1)
'** network$: gSTANDARD | gSERVER | gNODE | gDISTRIBTUION
'** direction$: gNEXT | gBACK (If gBACK, and you are showing UI)
'** then step backwards
'**
'** Returns: (not used)
'**
'** Implicitly sets the following global symbols for later processing:
'** SYM_INSTALLKIND$
'** SYM_INSTALLKINDS$ (list)
'** Sets the following global symbols (based on product #1) for later
'** processing:
'** SYM_REG_PRODUCTNAME$
'** SYM_REG_PRODUCTVER$
'*************************************************************************
PUBLIC FUNCTION InitLanguageDOC (prodno%, network$, direction$) AS STRING
DIM szProductName$, szProductVersion$, szInstallKind$, szLanguageSubdir$
szProductName$ = LdString(SID_DOC_PROD_NAME)
szProductVersion$ = LdString(SID_DOC_PROD_VER)
if prodno% = 1 THEN
SetSymbolValue SYM_REG_PRODUCTNAME$ , szProductName$
SetSymbolValue SYM_REG_PRODUCTVER$ , szProductVersion$
END IF
InitLanguages szProductName$, szProductVersion$, prodno%
InitLanguageDOC = ""
END FUNCTION
'*************************************************************************
'** DOCMOREDIRSCB
'** Purpose: This SUB handles the processing for the MORE DIRECTORIES
'** dialog.
'**
'** IN SYMBOLS handle to dialog, Control ID, Class, Instance
'**
'** Author: Michael Natsis
'** Arguments:
'**
'**
'** Returns:
'**
'*************************************************************************
SUB DOCMOREDIRSCB (hDlg&, CtrlId%, Classes$, LInst&)
DIM dirChanged1%, dirChanged2%, dirChanged3%, i%, notused%
DIM drvSel%,Inst%, dirToChange1$, dirToChange2$,dirToChange3$
STATIC drvIndex%(1 to MAX_NO_DRIVECOMBOS)
'** unc start
DIM uncPath$, fullPath$, dirPath$, drvPath$, n%, hCombo& '** MZ
DIM curCombo$, uncOff&, unusedPath$, NumDirs%
DIM comboBox$, editBox$,dirToChange$
'** unc end
Inst% = CINT(LInst&)
'** unc start
'** Handle all the combo boxes here (if any)
IF INSTR(Classes$, "IDC_COMBO") THEN
i% = VAL(MID$(Classes$, 10, LEN(Classes$) - 9))
comboBox = "IDC_COMBO"+Right$(Str$(i%),1)
editBox = "IDC_EDIT"+Right$(Str$(i%),1)
drvIndex%(i%) = Inst%
curCombo$ = GetListItem(comboBox, Inst%)
fullPath$ = GetListItem("IDC_EDIT",i)
Lot_SplitUNCPath fullPath$, uncPath$, dirPath$
uncOff& = INSTR(1, curCombo$, "\\")
IF uncOff > 0 THEN
Lot_SplitUNCPath MID$(curCombo$, uncOff&), uncPath$, unusedPath$
ELSE
uncPath$ = ""
END IF
SetListItem "IDC_EDIT", i, uncPath$ + dirPath$
AddListItem SYM_UPDATELIST$, editBox
EXIT SUB
END IF
'** unc end
SELECT CASE Classes$
CASE "__DLGINIT"
'** This is the directory for the Work Files
Lot_GetDriveFreeSpaceList "IDC_COMBO1"
SetListItem "IDC_EDIT", 1, GetSymbolValue("DOCWORKDIR")
drvIndex%(1) = ValidateEditBox(hDlg& , 1)
AddListItem SYM_UPDATELIST$, "IDC_EDIT1"
'** This is the directory for the Smart Master Files
Lot_GetDriveFreeSpaceList "IDC_COMBO2"
SetListItem "IDC_EDIT", 2, GetSymbolValue("DOCMASTERSDIR")
drvIndex%(1) = ValidateEditBox(hDlg& , 2)
AddListItem SYM_UPDATELIST$, "IDC_EDIT2"
'** This is the directory for the Backup Files
Lot_GetDriveFreeSpaceList "IDC_COMBO3"
SetListItem "IDC_EDIT", 3, GetSymbolValue("DOCBACKUPDIR")
drvIndex%(1) = ValidateEditBox(hDlg& , 3)
AddListItem SYM_UPDATELIST$, "IDC_EDIT3"
CASE "IDC_COMBO"
SELECT CASE Inst%
CASE 1
dirChanged1% = TRUE
CASE 2
dirChanged2% = TRUE
CASE 3
dirChanged3% = TRUE
END SELECT
CASE "IDC_BRWSDIR"
drvSel% = ValidateBrowse(hDlg&,Inst%)
SELECT CASE Inst%
CASE 1
dirChanged1% = TRUE
CASE 2
dirChanged2% = TRUE
CASE 3
dirChanged3% = TRUE
END SELECT
CASE "IDC_EDIT"
SELECT CASE Inst%
CASE 1
dirChanged1% = TRUE
CASE 2
dirChanged2% = TRUE
CASE 3
dirChanged3% = TRUE
END SELECT
CASE "IDC_OK"
'** Validate Paths always: to check for a file with the same name
'** WorkDir
'** unc start 1
drvSel% = ValidateEditBox(hDlg& , 1)
IF drvSel% = 0 THEN
SetListItem "__LASTSTATUS", 1, "Q"
EXIT SUB
ELSE
drvIndex%(1) = drvSel%
END IF
Lot_SplitUNCPath GetListItem("IDC_EDIT",1), uncPath$, dirPath$
IF uncPath$ = "" THEN
drvPath = LEFT$(GetListItem("IDC_COMBO1",drvIndex%(1)), 2)
ELSE
drvPath = ""
END IF
dirToChange1$ = drvPath$ + uncPath + dirPath$
'** unc end
IF ValidatePath(dirToChange1$) = FALSE THEN
SetListItem "_LASTSTATUS",1,"Q"
EXIT SUB
ELSE
SetSymbolValue "DOCWORKDIR", dirToChange1$
END IF
'** SMasters
'** unc start 2
drvSel% = ValidateEditBox(hDlg& , 2)
IF drvSel% = 0 THEN
SetListItem "__LASTSTATUS", 1, "Q"
EXIT SUB
ELSE
drvIndex%(2) = drvSel%
END IF
Lot_SplitUNCPath GetListItem("IDC_EDIT",2), uncPath$, dirPath$
IF uncPath$ = "" THEN
drvPath = LEFT$(GetListItem("IDC_COMBO2",drvIndex%(2)), 2)
ELSE
drvPath = ""
END IF
dirToChange2$ = drvPath$ + uncPath + dirPath$
'** unc end
IF ValidatePath(dirToChange2$) = FALSE THEN
SetListItem "_LASTSTATUS",1,"Q"
ELSE
SetSymbolValue "DOCMASTERSDIR", dirToChange2$
END IF
'** Backup
'** unc start 3
drvSel% = ValidateEditBox(hDlg& , 3)
IF drvSel% = 0 THEN
SetListItem "__LASTSTATUS", 1, "Q"
EXIT SUB
ELSE
drvIndex%(3) = drvSel%
END IF
Lot_SplitUNCPath GetListItem("IDC_EDIT",3), uncPath$, dirPath$
IF uncPath$ = "" THEN
drvPath = LEFT$(GetListItem("IDC_COMBO3",drvIndex%(3)), 2)
ELSE
drvPath = ""
END IF
dirToChange3$ = drvPath$ + uncPath + dirPath$
IF ValidatePath(dirToChange3$) = FALSE THEN
SetListItem "_LASTSTATUS",1,"Q"
ELSE
SetSymbolValue "DOCBACKUPDIR", dirToChange3$
END IF
END SELECT 'Classes
END SUB
FUNCTION DetectPreviousVersion ( Productfound$ ) AS STRING
DIM destpath$, temp%, dirpath$, adwpath$, pathDOC$, suitversion$
DIM lotusiniPath$, acroreadinipath$, acroreadpath$, defdir$
DIM smartextpath$, smartextinipath$, Docversion$
lotusiniPath$ = GetWindowsDir() + "lotus.ini"
if DoesFileExist(lotusinipath$,femExists) then
defdir$ = GetIniKeyString(lotusiniPath$,"Lotus Applications", "DocOnline")
'print defdir$
temp% = INSTR(1,LCASE$(defdir$),"release")
'print temp%
if temp% <> 0 then
Docversion$ = MID$(defdir$,(temp%+8),3)
'print Docversion$
end if
else
Docversion$ = "0"
End if
SetSymbolValue "DOCOBSDIR1", "lotsuite\"+"SMARTEXT\"
SetSymbolValue "DOCOBSDIR2", "lotsuite\"+LdString(SID_DOC_DIR)
DetectPreviousVersion = "No"
smartextinipath$ = GetWindowsDir() + "stxr30.ini"
IF DoesFileExist(smartextiniPath$, femExists) Then
smartextpath$ = GetIniKeyString( smartextinipath$, "SmarText", "NOTEPATH")
if ( smartextpath$ <> "" ) Then
temp% = Lot_cleanPath (smartextpath$)
pathDOC$ = smartextpath$ + "reader.exe"
If DoesFileExist(pathDOC$, femExists) Then
DetectPreviousVersion = "YES"
Productfound = "True"
SetSymbolValue "DOCOBSDIR1", smartextpath$
End if
end if
End IF
acroreadinipath$ = GetWindowsDir() + "acroread.ini"
acroreadpath$ = GetIniKeyString( acroreadinipath$, "Directories", "Personal")
If ( acroreadpath$ <> "" ) AND ( Docversion$ <> "2.1" )Then
temp% = Lot_cleanPath (acroreadpath$)
pathDOC$ = acroreadpath$ + "acroread.exe"
If DoesFileExist(pathDOC$, femExists) Then
DetectPreviousVersion = "YES"
Productfound = "True"
SetSymbolValue "DOCOBSDIR2", acroreadpath$
end if
End if
defdir$ = GetDOCPathfromLotusIni()
If ( ( defdir$ <> "" ) AND ( Docversion$ = "2.1")) Then
DetectPreviousVersion = "YES"
Productfound = "False"
End If
END FUNCTION
'****************************************************************************
'** SUB DOCRemoveProdFilesCB (hDlg&, CtrlId%, Classes%, Inst&)
'**
'** Purpose: callback to handle Remove Files dialog.
'**
'** Author: BMK 7/18/95 (significantly modified by TLB, and then jshaw)
'** Arguments: hDlg%, CtrlId%, Classes$, Inst%
'** Returns: NONE
'****************************************************************************
SUB DOCRemoveProdFilesCB(hDlg&, CtrlId%, Classes$, LInst&)
DIM nSections%, count%, chpt$, sym$, notused%
nSections% = 2
SELECT CASE Classes$
case "__DLGINIT"
AddListItem SYM_NORMALFONT$, STR$(IDC_TEXT1)
AddListItem SYM_NORMALFONT$, STR$(IDC_TEXT2)
AddListItem SYM_UPDATELIST$, SYM_NORMALFONT$
case "IDC_OK"
for count% = 1 to nSections%
sym$ = "DOCOBSFILES" + LTRIM$(STR$(count%))
chpt$ = Lot_GetChapterFromKeyWord (sym$)
if chpt$ <> "" then
notused% = Lot_SetChapterFilesInCopyListInOrOut (chpt$, 1)
end if
next
case "IDC_BACK"
' reset INF sections to OFF in case user changes his/her mind
for count% = 1 TO nSections%
sym$ = "DOCOBSFILES" + LTRIM$(STR$(count%))
chpt$ = Lot_GetChapterFromKeyWord(sym$)
if chpt$ <> "" then
notused% = Lot_SetChapterFilesInCopyListInOrOut (chpt$, 0)
end if
next
case "IDC_EXIT"
' reset INF sections to OFF in case user changes his/her mind
for count% = 1 TO nSections%
sym$ = "DOCOBSFILES" + LTRIM$(STR$(count%))
chpt$ = Lot_GetChapterFromKeyWord(sym$)
if chpt$ <> "" then
notused% = Lot_SetChapterFilesInCopyListInOrOut (chpt$, 0)
end if
next
END SELECT
END SUB
SUB DOC_RegisterSharedComponent(Key$, FileName$, Version$)
'*************************************************************************
'** Purpose: This product routines registers the shared component for the
'** product and writes an entry in cinstall.ini for uninstall
'**
'** IN SYMBOLS handle to dialog, Control ID, Class, Instance
'**
'** Author: Michael Natsis (stolen from flw.lss by JMD)
'** Arguments:
'** Key$ Shared section keyword, "WIN32SHRSMARTICONPRG", e.g.
'** FileName$ Name of shared component, "Icon Palette", e.g.
'** Version$ Version of shared component, "6.0", e.g.
'**
'*************************************************************************
DIM szProductName$, szProductVersion$, RegKeyName$, regStatus&
szProductName$ = LdString(SID_DOC_PROD_NAME)
szProductVersion$ = LdString(SID_DOC_PROD_VER)
IF Lot_IsTheFeatureInstalled(Key$) <> FALSE THEN
RegKeyName$ = gREGLOTUS + szProductName$ + "\" + szProductVersion$ + _
"\Components\" + FileName$ + "\" + Version$
regStatus& = Lot_RegCreateKeyEx(HKEY_LOCAL_MACHINE, RegKeyName$)
' Lot_RegisterObject Key$, UNIN_CLASS_REGISTRY_KEY$, gHLM$ + "\" + RegKeyName$
END IF
END SUB